
// import loadable from '@loadable/component'
import { createBrowserRouter } from "react-router-dom";


const routesConfig = createBrowserRouter([
  {
    path: '/',
    async lazy() {
      const Com = await import("../views/home");
      return { Component: Com.default };
    },
  },
  {
    path: '/home',
    async lazy() {
      const Com = await import("../views/home");
      return { Component: Com.default };
    },
  },
  {
    path: '/home/city',
    async lazy() {
      const Com = await import("../views/city");
      return { Component: Com.default };
    },
  },
  {
    path: '/city',
    async lazy() {
      const Com = await import("../views/city");
      return { Component: Com.default };
    },
  },
  {  
    path: '*',
    async lazy() {
      const Com = await import("../views/404");
      return { Component: Com.default };
    }
  },
  
])

export default routesConfig

